<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8" />
    <title>01_复习</title>
</head>

<body>
    <script>

        // for(var i = 1; i <= 100; i++){
        //     if(i % 2 == 0) {
        //         console.log(i);
        //     }
        // }
        var sum = 0;
        
        for(var i = 1; i <= 100; i++){
            if(i % 2 == 0) {
                sum += i;
            }
        }

        console.log(sum);

    </script>
</body>

</html>